<template>
  <div class="task-audit-container">
    
  
  <avue-form ref="avueFormRef" v-model="form" :option="option" @submit="saveForm" @reset-change="cancelForm"></avue-form>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, onMounted, defineProps } from 'vue';
import { Base64 } from 'js-base64';
import { Check, Close } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
const emits = defineEmits(['saveForm']);
/* ------ form ------ */
const avueFormRef = ref();
const form = ref({});
const option: any = reactive({
  submitBtn: false,
  emptyBtn: false,
  submitText: '确认',
  emptyText: '取消',
  labelWidth: '160',
  column: [
    {
      label: '任务名称',
      prop: 'title',
      span: 12,
      disabled: false,
      rules: [
        {
          required: true,
          message: '请输入任务名称',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '任务类型',
      prop: 'abstractInfo',
      type: 'select',
      disabled: false,
      maxlength: 300,
      span: 12,
      showWordLimit: true,
    },
    {
      label: '任务系统提示词',
      type: 'textarea',
      disabled: false,
      maxlength: 300,
      prop: 'comment',
      slot: true,
      span: 24,
    },
    {
      label: '任务用户提示词',
      type: 'textarea',
      disabled: false,
      maxlength: 300,
      prop: 'comment',
      slot: true,
      span: 24,
    },
    {
      label: '附件',
      prop: 'files',
      span: 24,
      type: 'upload',
    },
    {
      label: '截图文档内容长度',
      prop: 'comment',
      span: 12,
    },
    {
      label: '文档目录模版',
      prop: 'comment',
      type: 'select',
      span: 12,
    },
    {
      label: '是否分段处理',
      prop: 'comment',
      type: 'radio',
      dicData: [
        { label: '是', value: '1' },
        { label: '否', value: '2' },
      ],
      span: 12,
    },
    {
      label: '是否有默认目录要求',
      prop: 'select',
      type: 'radio',
      dicData: [
        { label: '是', value: '1' },
        { label: '否', value: '2' },
      ],
      span: 12,
    },
  ],
});
let saveForm = () => {};
let cancelForm = () => {};

defineExpose({});
</script>
<style lang="scss" scoped>
.task-audit-container {
  padding: 10px;
  height: 100%;
  overflow: auto;
  background-color: #fff;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}
</style>
